package Game;

import java.awt.Graphics2D;
import java.awt.Image;

public abstract class Enemy extends AnimatedObject
{
	public enum EnemyState
	{
		DEAD, 
		MOVING,
		IDLE,
		ATTACKING,
		PARALYZED
	}
	
	EnergyBar lifeBar;
	
	EnemyState state;
	float velocity;
	
	Image idle, moving, attacking, dead, paralyzed;
	
	boolean active;
	boolean spawned;
	
	int spawnTime;
	
	public Enemy(int x, int y, int w, int h, int spawnTime) 
	{
		super(x, y, w, h);
		state = EnemyState.IDLE;
		this.spawnTime = spawnTime;
		this.spawned = false;
		//System.out.println(x + " " + y + " " + w + " " + h);
	}
	
	public void Spawn()
	{
		active = true;
		spawned = true;
		Move();
	}
	
	protected abstract void Behaviour();
	public abstract void Paralyze(int time);
	public abstract void Slow();
	public abstract void Kill();
	public abstract void Move();

	public void Draw(Graphics2D g2d) 
	{ 
		super.Draw(g2d);
		
		//System.out.println(x + " " + y + " " + w + " " + h);
	}
}
